home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2001 / MacHack 2001.toast / pc / The Hacks / APLocation / Sources / MacOS_ConnectixUtils.h < prev    next >
Encoding:
C/C++ Source or Header  |  2001-06-23  |  1.8 KB  |  52 lines

  1. /*==================================================================
  2.     File:        MacOS_ConnectixUtils.h
  3.  
  4.     Contains:    Miscellaneous utility routines used in program.
  5.  
  6.     Written by:    Various
  7.  
  8.     Copyright:    © 1995-2001 Connectix Corporation
  9. ==================================================================*/
  10.  
  11. #ifndef CONNECTIXUTILS_H_
  12. #define CONNECTIXUTILS_H_
  13.  
  14. #ifndef __FILES__
  15. #include <Files.h>
  16. #endif
  17.  
  18. #ifndef __PROCESSES__
  19. #include <Processes.h>
  20. #endif
  21.  
  22. enum
  23. {
  24.     kPascalStringMaxLength    = 255
  25. };
  26.  
  27. const ProcessSerialNumber    kCurrentProcessPSN    = {0, kCurrentProcess};
  28.  
  29. #if TARGET_CPU_68K
  30.     #pragma parameter __D0 Min32(__D0, __D1)
  31. #endif
  32. SInt32 Min32 (SInt32 x, SInt32 y) THREEWORDINLINE(0xB280, 0x6E02, 0x2001);
  33.  
  34. #if TARGET_CPU_68K
  35.     #pragma parameter __D0 UMin32(__D0, __D1)
  36. #endif
  37. UInt32 UMin32 (UInt32 x, UInt32 y) THREEWORDINLINE(0xB280, 0x6202, 0x2001);
  38.  
  39. SInt32            CompareBytes(const void * inSource, const void*  inDest, UInt32 inByteCount);
  40. Boolean            BytesMatch(const void * inSource, const void * inDest, UInt32 inByteCount);
  41. void            FillMemory(void * inBase, UInt32 inByteCount, UInt8 inFillValue);
  42. void            ZeroMemory(void * inBase, UInt32 inByteCount);
  43.  
  44. OSErr        FSGetDirectoryID(const FSSpec * inFileSpec, long * outDirID);
  45. OSErr        MakeFSSpec(SInt16 inVRefNum, SInt32 inDirID, ConstStr255Param inName, FSSpec * outFileSpec);
  46.  
  47. OSErr        FSpGetCatInfo(const FSSpec * inSpec, CInfoPBPtr outCatInfo);
  48. OSErr        FSpGetDirInfo(const FSSpec * inFileSpec, CInfoPBPtr outCInfoPB);
  49. OSErr        FindFolderItemByTypeAndCreator( short inVRefNum, OSType inFolderType, Boolean inSearchSubdirectories, OSType inFileType, OSType inFileCreator, FSSpec * outFileSpec);
  50. OSErr        FindDirectoryItemByTypeAndCreator( short inVRefNum, long inDirID, Boolean inSearchSubdirectories, OSType inFileType, OSType inFileCreator, FSSpec * outFileSpec);
  51.  
  52. #endif // CONNECTIXUTILS_H_